#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "global.h"
#include <QMutex>
class PrintScpThread;
class SysTrayIcon;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
    void changeEvent(QEvent *e);
    void closeEvent(QCloseEvent *e);

protected slots:
    void onSetup();
    void onAddFilm();
    void onAbout();

public slots:
    void sys_log(int level, const QString &msg);
    void updateFilmCounter();
    void onPrintJob(const QString &printerAE);

private:

    void init();

    SysTrayIcon *trayIcon;
    Ui::MainWindow *ui;
    PrintScpThread *printscp;
    QMutex mutex;

    QList<PrintRule*> ruleList;
    GeneralSettings general;
    PrintFormat format;
    FilmPaperMap paperMap;
};

#endif // MAINWINDOW_H
